package com.wsoft.bpm.utils;

import java.util.HashMap;
import java.util.Map;

/**
 * 工具类
 *
 * @author zhonglj
 * @date 2024/12/3 11:16
 **/
public class UtilMisc {

    public static Map<String, String> toMap(String name1, String value1, String name2, String value2) {
        return populateMap(new HashMap<String, String>(16), name1, value1, name2, value2);
    }

    private static Map<String, String> populateMap(Map<String, String> map, String... data) {
        for (int i = 0; i < data.length; ) {
            map.put(data[i++], data[i++]);
        }
        return map;
    }

}
